home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / games / worm.zip / WORMINIT.C < prev    next >
C/C++ Source or Header  |  1992-09-18  |  829b  |  30 lines

  1.  
  2. #include "worm.h"
  3.  
  4. /* --------------------------------------------------------------------- */
  5.  
  6. BOOL WormInit(HANDLE hInstance)
  7. {
  8. HANDLE hMemory;
  9. PWNDCLASS pWndClass;
  10. BOOL bSuccess;
  11.  
  12. hMemory = LocalAlloc(LPTR, sizeof(WNDCLASS));
  13. pWndClass = (PWNDCLASS) LocalLock(hMemory);
  14.  
  15. pWndClass->style = NULL;
  16. pWndClass->lpfnWndProc = WormWndProc;
  17. pWndClass->hInstance = hInstance;
  18. pWndClass->hIcon = LoadIcon(hInstance, "worm");
  19. pWndClass->hCursor = LoadCursor(NULL, IDC_CROSS);
  20. pWndClass->hbrBackground = GetStockObject(WHITE_BRUSH);
  21. pWndClass->lpszMenuName = (LPSTR) NULL;
  22. pWndClass->lpszClassName = (LPSTR) WORM_APPNAME;
  23. bSuccess = RegisterClass(pWndClass);
  24. LocalUnlock(hMemory);
  25. LocalFree(hMemory);
  26.  
  27. return(bSuccess);
  28. }
  29. /* --------------------------------------------------------------------- */
  30. /* EOF */